<html>
<head><meta charset="utf-8"><title>question about clippy · t-compiler/wg-polonius · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/index.html">t-compiler/wg-polonius</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/question.20about.20clippy.html">question about clippy</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="246960174"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/question%20about%20clippy/near/246960174" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lengyijun <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/question.20about.20clippy.html#246960174">(Jul 23 2021 at 10:07)</a>:</h4>
<p>A question maybe not very related to this thread:<br>
If it's possible for clippy to read the output of polonius in the future?<br>
Liveness analysis is very basic to mir-based analysis.</p>



<a name="246984287"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/question%20about%20clippy/near/246984287" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/question.20about.20clippy.html#246984287">(Jul 23 2021 at 14:26)</a>:</h4>
<p>I'm not familiar with clippy internals, but I think it was using compiler internal API already ?</p>
<p>And thus could be already using what they would like. (I wouldn't recommend it because polonius is far from finished/complete/bug-free) but could probably access NLL &amp; liveness data today.</p>
<p>Though I'm not sure what they would the polonius output for: the analyses only want to compute and output compile errors</p>



<a name="247021079"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/question%20about%20clippy/near/247021079" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Vytautas Astrauskas [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/question.20about.20clippy.html#247021079">(Jul 23 2021 at 19:25)</a>:</h4>
<p><span class="user-mention silent" data-user-id="389101">lengyijun</span> <a href="#narrow/stream/186049-t-compiler.2Fwg-polonius/topic/question.20about.20clippy/near/246960174">said</a>:</p>
<blockquote>
<p>A question maybe not very related to this thread:<br>
If it's possible for clippy to read the output of polonius in the future?<br>
Liveness analysis is very basic to mir-based analysis.</p>
</blockquote>
<p>Clippy can easily compute the liveness information by using the dataflows provided by the Rust compiler.</p>



<a name="247021748"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/question%20about%20clippy/near/247021748" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Vytautas Astrauskas [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/question.20about.20clippy.html#247021748">(Jul 23 2021 at 19:31)</a>:</h4>
<p>If you want to have information about when borrows end, then you need <a href="https://github.com/rust-lang/rust/pull/86977">this PR</a> to land to have access to that. The PR also includes a test that shows how to access the information.</p>



<a name="247021830"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/question%20about%20clippy/near/247021830" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Vytautas Astrauskas [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/question.20about.20clippy.html#247021830">(Jul 23 2021 at 19:32)</a>:</h4>
<p>By the way, what is your planned use of Polonius facts in Clippy?</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>